package com.kfm.springboot.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.yulichang.annotation.EntityMapping;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@TableName("user")
public class User implements Serializable {

    @TableId
    private Integer id;

    @TableField("username")
    private String username;

    private String password;

    @TableField(exist = false)
    @EntityMapping(thisField = "id", joinField = "uid")
    private List<Account> accounts;
}
